package com.meilai.project.controller.mini;


import com.meilai.project.dto.base.ApiResult;
import com.meilai.project.service.business.offer.OfferService;
import com.meilai.project.vo.business.offer.OfferQueryVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 报价表 前端控制器
 * </p>
 *
 * @author xhy
 * @since 2022-01-11
 */
@RestController
@RequestMapping("api/mini/offer")
@Api(tags = "小程序-报价")
public class MiniOfferController {

    @Autowired
    private OfferService service;

    @GetMapping("/query")
    @ApiOperation("报价查询")
    public ApiResult<List<OfferQueryVO>> query(@RequestParam("industry_id") Long industry_id) {
        return ApiResult.ok(service.queryByIndustryId(industry_id));
    }
}

